PREFIX = open_

ifeq ($(CHIPARCH),)
	@echo CHIPARCH must be set
endif

ccflags-y := -D$(CHIPARCH) -DRELEASE -DUSER_BIT_32 -DKERNEL_BIT_32 -Wno-date-time -D_GNU_SOURCE
ccflags-y += -I$(src)/../include
ccflags-y += -I$(src)/ext_inc

ccflags-y += -I$(src)/isp/arch/$(CHIPARCH)/include
ccflags-y += -I$(src)/isp/mkp/include
ccflags-y += -I$(src)/../libraries/isp/arch/$(CHIPARCH)/include
ccflags-y += -I$(src)/../libraries/isp/include

include $(src)/hisi-hwrng/Kbuild
include $(src)/sys_config/Kbuild
include $(src)/osal/Kbuild
include $(src)/wdt/Kbuild
include $(src)/adc/Kbuild
ifndef DISABLE_ISP
    include $(src)/isp/Kbuild
endif
include $(src)/piris/Kbuild
include $(src)/pwm/Kbuild
ifndef DISABLE_IST
    include $(src)/sample_ist/Kbuild
endif
include $(src)/sensor_i2c/Kbuild
include $(src)/sensor_spi/Kbuild
include $(src)/mipi_rx/Kbuild
#+user

ifeq ($(CHIPARCH),hi3516ev200)
    include $(src)/acodec/Kbuild
    include $(src)/adec/Kbuild
    include $(src)/aenc/Kbuild
    include $(src)/ai/Kbuild
    include $(src)/aio/Kbuild
    include $(src)/ao/Kbuild
    include $(src)/base/Kbuild
    include $(src)/chnl/Kbuild
    include $(src)/h264e/Kbuild
    include $(src)/h265e/Kbuild
    include $(src)/ive/Kbuild
    include $(src)/jpege/Kbuild
ifndef DISABLE_PM
    # it doesn't compile yet
    #include $(src)/pm/Kbuild
endif
    include $(src)/rc/Kbuild
    include $(src)/rgn/Kbuild
    include $(src)/sys/Kbuild
ifndef DISABLE_TDE
    include $(src)/tde/Kbuild
endif
    include $(src)/vedu/Kbuild
    include $(src)/venc/Kbuild
    include $(src)/vgs/Kbuild
    include $(src)/vi/Kbuild
ifndef DISABLE_VO
    #include $(src)/vo/Kbuild
endif
    include $(src)/vpss/Kbuild
    # +fb
endif
